package com.pureut.system.api.factory;

import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.system.api.QualityFeginService;
import com.pureut.system.api.vo.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 文件服务降级处理
 * 
 * @author ruoyi
 */
@Component
public class RemoteQuilityFallbackFactory implements FallbackFactory<QualityFeginService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteQuilityFallbackFactory.class);

    @Override
    public QualityFeginService create(Throwable throwable)
    {
        log.error("品质服务调用失败:{}", throwable.getMessage());
        return new QualityFeginService()

        {

            @Override
            public AjaxResult add(QualityInspectionDocumentVo qualityInspectionDocumentVo) throws Exception {
                return null;
            }

            @Override
            public AjaxResult materialAdd(QualityTemporaryVo qualityTemporaryVo) {
                return null;
            }

            @Override
            public boolean smallRollAdd(QualityProductionFreezeVo qualityProductionFreezeVo) {
                return false;
            }

            @Override
            public boolean check(QualitySchemeConfigurationVo qualitySchemeConfigurationVo) {
                return false;
            }

            @Override
            public AjaxResult getInspectionMark(InspectionMarkVo inspectionMarkVo) {
                return null;
            }

            @Override
            public AjaxResult removeDoc(String relevanceDoc) {
                return null;
            }

            @Override
            public AjaxResult getQualityTemporaryList(String wsiMaterialNumber) {
                return null;
            }

            @Override
            public AjaxResult getPatrolTemporaryList(String wsiMaterialNumber) {
                return null;
            }

            @Override
            public boolean addDegreas(QualityInspectionDocumentVo qualityInspectionDocumentVo) {
                return false;
            }

            @Override
            public AjaxResult getDocumentByBatchNumber(String batchNumber, String degreasDocumentNumber) {
                return null;
            }

            @Override
            public boolean addWares(QualityInspectionDocumentVo qualityInspectionDocumentVo) {
                return false;
            }

            @Override
            public AjaxResult updateQualityInspectionDocument(UpdateQualityStatusVo updateQualityStatusVo) {
                return null;
            }

            @Override
            public AjaxResult getYield(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult getBadMonth(String lineCode) {
                return null;
            }


        };
    }
}
